import request from '@/utils/request'

export function updatePassword(data) {
	return request({
		url: `/user/password`,
		method: 'POST',
		data
	})
}
export function getUserInfo() {
	return request({ url: '/web/anon/user/getLoginUserInfo', method: 'GET' })
}

export function getAddress() {
	return request({ url: '/web/authc/address/list', method: 'GET' })
}

export function getAddressDetail(data) {
	return request({ url: '/web/authc/address/detail',data, method: 'GET' })
}

export function saveAddress(data) {
	return request({
		url: `/web/authc/address/create`,
		method: 'POST',
		data
	})
}


export function updateAddress(data) {
	return request({
		url: `/web/authc/address/updateInfo`,
		method: 'POST',
		data
	})
}


export function deleteAddress(data) {
	return request({
		url: `/web/authc/address/cancel`,
		method: 'POST',
		data
	})
}



export function wechatPay(data) {
	return request({
		url: `/pay/wechat`,
		method: 'POST',
		data
	})
}
